package com.yh.csx.bsf.ods;

import com.yh.csx.bsf.core.util.ContextUtils;
import com.yh.csx.bsf.core.util.LogUtils;
import com.yh.csx.bsf.ods.fullload.CanalServerProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
@EnableConfigurationProperties
@SpringBootApplication
public class CanelFullLoadStarter {

	public static void main(String[] args) {
		SpringApplication.run(CanelFullLoadStarter.class, args);
		LogUtils.info(CanelFullLoadStarter.class, "ods", "http://loalhost:8081/sync.html提交同步任务");
		LogUtils.info(CanelFullLoadStarter.class, "ods", "http://loalhost:8081/ 查看进度");
		CanalServerProvider canalServerProvider=ContextUtils.getBean(CanalServerProvider.class, true);
		canalServerProvider.start();
	}
	@Bean
	public StragtegyProvider getStragtegyProvider() {
		return new StragtegyProvider();
	}
}
